package org.openwork.portlet.skillmanagement.service.http;

import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;

import org.openwork.portlet.skillmanagement.service.SkillUserServiceUtil;

import java.rmi.RemoteException;


/**
 * <a href="SkillUserServiceSoap.java.html"><b><i>View Source</i></b></a>
 *
 * <p>
 * ServiceBuilder generated this class. Modifications in this class will be
 * overwritten the next time is generated.
 * </p>
 *
 * <p>
 * This class provides a SOAP utility for the
 * {@link org.openwork.portlet.skillmanagement.service.SkillUserServiceUtil} service utility. The
 * static methods of this class calls the same methods of the service utility.
 * However, the signatures are different because it is difficult for SOAP to
 * support certain types.
 * </p>
 *
 * <p>
 * ServiceBuilder follows certain rules in translating the methods. For example,
 * if the method in the service utility returns a {@link java.util.List}, that
 * is translated to an array of {@link org.openwork.portlet.skillmanagement.model.SkillUserSoap}.
 * If the method in the service utility returns a
 * {@link org.openwork.portlet.skillmanagement.model.SkillUser}, that is translated to a
 * {@link org.openwork.portlet.skillmanagement.model.SkillUserSoap}. Methods that SOAP cannot
 * safely wire are skipped.
 * </p>
 *
 * <p>
 * The benefits of using the SOAP utility is that it is cross platform
 * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
 * even Perl, to call the generated services. One drawback of SOAP is that it is
 * slow because it needs to serialize all calls into a text format (XML).
 * </p>
 *
 * <p>
 * You can see a list of services at
 * http://localhost:8080/tunnel-web/secure/axis. Set the property
 * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
 * security.
 * </p>
 *
 * <p>
 * The SOAP utility is only generated for remote services.
 * </p>
 *
 * @author    Samuel Garcia Martinez
 * @see       SkillUserServiceHttp
 * @see       org.openwork.portlet.skillmanagement.model.SkillUserSoap
 * @see       org.openwork.portlet.skillmanagement.service.SkillUserServiceUtil
 * @generated
 */
public class SkillUserServiceSoap {
    private static Log _log = LogFactoryUtil.getLog(SkillUserServiceSoap.class);

    public static org.openwork.portlet.skillmanagement.model.SkillUserSoap addSkillUser(
        long auditUserId, long userId, long skillId, short experience)
        throws RemoteException {
        try {
            org.openwork.portlet.skillmanagement.model.SkillUser returnValue = SkillUserServiceUtil.addSkillUser(auditUserId,
                    userId, skillId, experience);

            return org.openwork.portlet.skillmanagement.model.SkillUserSoap.toSoapModel(returnValue);
        } catch (Exception e) {
            _log.error(e, e);

            throw new RemoteException(e.getMessage());
        }
    }

    public static org.openwork.portlet.skillmanagement.model.SkillUserSoap updateSkillUser(
        long auditUserId, long userId, long skillId, short experience)
        throws RemoteException {
        try {
            org.openwork.portlet.skillmanagement.model.SkillUser returnValue = SkillUserServiceUtil.updateSkillUser(auditUserId,
                    userId, skillId, experience);

            return org.openwork.portlet.skillmanagement.model.SkillUserSoap.toSoapModel(returnValue);
        } catch (Exception e) {
            _log.error(e, e);

            throw new RemoteException(e.getMessage());
        }
    }

    public static int searchCountByUserId(long userId)
        throws RemoteException {
        try {
            int returnValue = SkillUserServiceUtil.searchCountByUserId(userId);

            return returnValue;
        } catch (Exception e) {
            _log.error(e, e);

            throw new RemoteException(e.getMessage());
        }
    }

    public static org.openwork.portlet.skillmanagement.model.SkillUserSoap[] searchByUserId(
        long userId, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws RemoteException {
        try {
            java.util.List<org.openwork.portlet.skillmanagement.model.SkillUser> returnValue =
                SkillUserServiceUtil.searchByUserId(userId, start, end,
                    orderByComparator);

            return org.openwork.portlet.skillmanagement.model.SkillUserSoap.toSoapModels(returnValue);
        } catch (Exception e) {
            _log.error(e, e);

            throw new RemoteException(e.getMessage());
        }
    }

    public static org.openwork.portlet.skillmanagement.model.SkillUserSoap[] searchByUserId(
        long userId) throws RemoteException {
        try {
            java.util.List<org.openwork.portlet.skillmanagement.model.SkillUser> returnValue =
                SkillUserServiceUtil.searchByUserId(userId);

            return org.openwork.portlet.skillmanagement.model.SkillUserSoap.toSoapModels(returnValue);
        } catch (Exception e) {
            _log.error(e, e);

            throw new RemoteException(e.getMessage());
        }
    }

    public static int searchCountBySkillId(long skillId)
        throws RemoteException {
        try {
            int returnValue = SkillUserServiceUtil.searchCountBySkillId(skillId);

            return returnValue;
        } catch (Exception e) {
            _log.error(e, e);

            throw new RemoteException(e.getMessage());
        }
    }

    public static org.openwork.portlet.skillmanagement.model.SkillUserSoap[] searchBySkillId(
        long skillId) throws RemoteException {
        try {
            java.util.List<org.openwork.portlet.skillmanagement.model.SkillUser> returnValue =
                SkillUserServiceUtil.searchBySkillId(skillId);

            return org.openwork.portlet.skillmanagement.model.SkillUserSoap.toSoapModels(returnValue);
        } catch (Exception e) {
            _log.error(e, e);

            throw new RemoteException(e.getMessage());
        }
    }

    public static org.openwork.portlet.skillmanagement.model.SkillUserSoap[] searchBySkillId(
        long skillId, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws RemoteException {
        try {
            java.util.List<org.openwork.portlet.skillmanagement.model.SkillUser> returnValue =
                SkillUserServiceUtil.searchBySkillId(skillId, start, end,
                    orderByComparator);

            return org.openwork.portlet.skillmanagement.model.SkillUserSoap.toSoapModels(returnValue);
        } catch (Exception e) {
            _log.error(e, e);

            throw new RemoteException(e.getMessage());
        }
    }
}
